package org.luxor.html.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.luxor.html.entity.User;

import java.util.List;

/**
 * @author Mr.Yan  @date 2019/9/25$
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    @Select("select * from user ${ew.customSqlSegment}")
    List<User> getAll(@Param(Constants.WRAPPER) Wrapper wrapper);

    @Select("select * from user where id=#{id}")
    User getUserById(Long id);

    User getUserByXmlId(@Param("id") Long id);
}
